package oop4;

/**
 * @author oldliu
 * @since 1.0
 */
public class Dog extends Pet {
    private String strain;//狗的类别
    //构造方法
    public Dog(String name,String strain){
        //super();
        this.strain=strain;
        super.setName(name);//！！！
        super.color="黄";
        System.out.println("小狗的两个参数的构造方法");

    }
    public Dog(String name,int health,int love,String sex,String strain){
        super(name,health,love,sex);
        this.strain=strain;
        super.color="灰";
    }
    public void print(){
        System.out.println("这是一只狗");
        super.print();
        System.out.println("他的类别是"+strain);
    }
    public void duoguanxianshi(){
        System.out.println(super.getName()+"抓住了一只耗子");
        System.out.println("望天下的老鼠耗子尾汁");
    }

}
